the input table is NULL.
Also, no need for set_trap_table to take the per-domain biglock.
Signed-off-by: Keir Fraser <keir@xensource.com>
struct trap_info *dst = current->arch.guest_context.trap_ctxt;
long rc = 0;
- LOCK_BIGLOCK(current->domain);
+ /* If no table is presented then clear the entire virtual IDT. */
+ if ( traps == NULL )
+ {
+ memset(dst, 0, 256 * sizeof(*dst));
+ init_int80_direct_trap(current);
+ return 0;
+ }
for ( ; ; )
{
traps++;
}
- UNLOCK_BIGLOCK(current->domain);
-
return rc;
}